﻿@model GameSchool.Models.Assignment

@{
    ViewBag.Title = "ViewPage1";
    Layout = "~/Views/Shared/_Layout.cshtml";
}



<fieldset style="border:0px;">
    <legend>Assignment</legend>

    <div class="display-label">Verkefni</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">Lýsing</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Description)
    </div>


    <div class="display-label">Er nauðsynlegt</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.IsMandatory)
    </div>

</fieldset>

<div>
@foreach (var item in Model.Questions.Where(x => x.Active).ToList()) {
    
    <div>
    Spurning:<br />
    @item.Title
    </div>
    
    <div>
    <span>Svarmöguleikar</span><br />
    @foreach (var answer in item.AnswerOptions.ToList())
    { 
        @Html.CheckBox(answer.AnswerText)
    }
    </div>
    
}

</div>
